Content starts here Modify Instances Using Mutator Functions
This page last changed on Apr 07, 2008.

edocs Home > BEA AquaLogic Data Services Platform 3.0/3.2 Documentation > ALDSP 3.2 New Features Documentation

Modify Instances Using Mutator Functions

This topic describes how to use the mutator functions to create and modify XXDM instances from within XQuery and XQuery Scripting Extensions (XQSE) programs.

Using the Mutator Functions

To use the mutator functions, do the following:

  1. Identify the element you need to change and promote the element to an unmodified changed-element using the changed-element() function.
    For example, the following call declares $co to be an unmodified changed-element of type orders for the element represented by $o. 
    declare $co as changed-element(orders) := changed-element($o);
  2. Modify the changed-element using the mutator functions.
    • To insert a node into an XXDM instance (changed-element) at a specified XPath location, use the fn-bea:insert-into() function.
    • To delete a node at a specified XPath location in an XXDM instance, use the fn-bea:delete() function.
    • To replace the value of a node in an XXDM instance at a specified XPath location, use the fn-bea:replace-value() function.
      See Mutator Functions for a detailed description of each of the mutator functions.

See Also

Concepts
Reference
Document generated by Confluence on Apr 28, 2008 16:19